package cn.kane.command;

public class Command implements ICommand {

	private ICalendar calendar;
	private char operator;
	private int value;
	
	public Command(ICalendar calendar,char operator,int value){
		this.calendar = calendar ;
		this.operator = operator ;
		this.value = value ;
	}
	
	@Override
	public void execute() {
		calendar.calc(this.operator, this.value);
	}

	@Override
	public void undo() {
		calendar.undo(this.operator, this.value);
	}

}
